package com.juzipi.mp.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.juzipi.mp.entity.Student;
import com.juzipi.mp.mapper.StudentMapper;
import com.juzipi.mp.service.StudentService;
import org.springframework.stereotype.Service;

/**
 * @Author juzipi
 * @Date 2021/8/13 16:46
 * @Info
 */
@Service
public class StudentServiceImpl extends ServiceImpl<StudentMapper, Student> implements StudentService {


    @Override
    public Student getStudentOne(String gender) {
        Student student = baseMapper.selectOne(new QueryWrapper<Student>().lambda().eq(Student::getGender, gender));
        System.out.println(student.getGender());
        System.out.println(student.getName());
        return student;
    }

}
